package com.home.qh.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.ExchangeRateDao;
import com.home.qh.model.ExchangeRate;
import com.home.qh.service.ExchangeRateManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("exchangeRateManager")
public class ExchangeRateManagerImpl extends GenericManagerImpl<ExchangeRate, Long> implements ExchangeRateManager {
	ExchangeRateDao exchangeRateDao;

    @Autowired
    public ExchangeRateManagerImpl(ExchangeRateDao exchangeRateDao) {
        super(exchangeRateDao);
        this.exchangeRateDao = exchangeRateDao;
    }

	public List<ExchangeRate> getExchangeRateByAppDate(String fromDate, String toDate) {
		return exchangeRateDao.getExchangeRateByAppDate(fromDate, toDate);
	}

	public List<ExchangeRate> getExchangeRateByExchangeRate(ExchangeRate exchangeRate, String sort, boolean desc, int startResult, int maxResults) {
		return exchangeRateDao.getExchangeRateByExchangeRate(exchangeRate, sort, desc, startResult, maxResults);
	}

}